package com.example.t1.activity;

import android.app.Activity;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.text.Html;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

import com.example.t1.R;
import com.example.t1.R.id;
import com.example.t1.R.layout;
import com.example.t1.view.BeyondEdit;

public class Activity3 extends Activity implements OnClickListener {
    BeyondEdit beyondEdit;
    TextView delText;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
	super.onCreate(savedInstanceState);
	setContentView(R.layout.activity_activity3);
	TextView textView = (TextView) findViewById(R.id.t1);
	textView.setText(Html.fromHtml("<font color=#E61A6B>��ɫ����</font> "
		+ "<i><font color=#1111EE>��ɫб�����</font></i>"
		+ "<u><i><font color=#1111EE>��ɫб��Ӵ����»��ߴ���</font></i></u>"));
	beyondEdit = (BeyondEdit) findViewById(R.id.beyondEdit1);
	beyondEdit.setLimitNum(10);
	Button button = (Button) findViewById(R.id.button1);
	button.setOnClickListener(this);

	delText = (TextView) findViewById(R.id.delText);
	delText.getPaint().setARGB(255, 204, 36, 28);
	delText.getPaint().setFlags(Paint.STRIKE_THRU_TEXT_FLAG); // ɾ����
	
	// delText.getPaint().setColor(Color.RED);
    }

    @Override
    public void onClick(View v) {
	// TODO Auto-generated method stub
	switch (v.getId()) {
	case R.id.button1:
	    beyondEdit.getEditableText().delete(0, 2);
	    break;

	default:
	    break;
	}
    }

}
